package com.colin.app.pay;

import android.app.Activity;

import com.colin.app.pay.ali.ALiPayUtil;
import com.colin.app.pay.callback.IPayListener;
import com.colin.app.pay.weixin.WXPayUtil;


/**
 * Created by Administrator on 2017/9/12.
 */

public class PayUtil {
    public final static int PAY_ALI = 0;
    public final static int PAY_WX = 1;

    /**
     * 支付
     *
     * @param mActivity
     * @param payByWhat
     * @param o
     * @param iPayListener
     */
    public static void pay(final Activity mActivity, int payByWhat, Object o, IPayListener iPayListener) {
        if (payByWhat == PAY_ALI) {
            ALiPayUtil.getInstance().pay(mActivity, o, iPayListener);
        } else if (payByWhat == PAY_WX) {
            WXPayUtil.getInstance().pay(mActivity, o, iPayListener);
        }
    }

}
